package com.speed_run.mapper;

import com.speed_run.dto.*;
import com.speed_run.model.Circle;
import com.speed_run.model.MomentCircle;
import com.speed_run.model.MomentComment;
import com.speed_run.model.MomentPics;
import com.speed_run.model.MomentVideo;
import com.speed_run.vo.circle.CircleVO;
import com.speed_run.vo.moment.MomentVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface CircleMapper {
    public CircleVO circle(Integer id);
    public List<CircleVO> hostCircles();
    public List<Integer> getFollowCicleIds(String userId);
    public void followCircle(@Param("circleId") Integer id, @Param("userId") String userId);
    public void unFollowCircle(@Param("circleId") Integer id, @Param("userId") String userId);
    public List<CircleVO> getUserCircle(String userId);
    public Integer  getCircleCountByUser(@Param("circleId") Integer id, @Param("userId") String userId);
    public void saveMoment(MomentVo vo);
    public void saveMomentVideo(MomentVideo vo);
    public void saveMomentPics(List<MomentPics> pics);
    public void saveMomentCircles(List<MomentCircle> circles);
    public Integer findCircleLike(@Param("momentId") Integer id, @Param("userId") String userId);
    public void delMoment(@Param("momentId") Integer id, @Param("userId") String userId);
    public void saveLike(@Param("momentId") Integer id, @Param("userId") String userId, @Param("createDate") Date createDate);
    public void delLike(@Param("momentId") Integer id, @Param("userId") String userId);
    public void saveComment(CommnetDTO vo);
    public void delComment(@Param("commentId") Integer id, @Param("userId") String userId);
    public List<HotCircleDTO> hotCircleTop5();
    public List<UserCircleDTO> getMoment(String userId);
    public  List<UserCircleDTO> getUserMoment(String userId);
    public List<UserCircleDTO> getCircleDetailMoment( @Param("circleId") Integer circleId, @Param("userId") String userId);
    List<UserCircleDTO> getHotMoment(String userId);
    public  List<UserCircleDTO> getUserFollowMoment(String userId);
    public List<MomentComment> getMomentComment(@Param("momentId") Integer id, @Param("userId") String userId);
    public List<String> getMomentPic(Integer momentId);
    public VideoDTO getVideo(Integer momentId);
    public void userFollower(@Param("userId")String userId, @Param("followId")String followId); //添加关注
    public void delFollower(@Param("userId")String userId,@Param("followId") String followId); //取消关注
    public List<FollowerDTO> getMyFollowers(String userId); //获取关注我的人
    public List<FollowerDTO> getMyFollow(String userId); //获取我的关注人
    public Circle getCircleById(Integer id);
    public void updateCircle(Circle cirlce);
    public void insertCircle(Circle circle);
    public List<Map<String, Object>> getCircleTableData();
    public UserCircleDetailDTO getUserCircleDetail(@Param("momentId") Integer momentId,@Param("userId") String userId);
    public List<UserAvatarDTO> getUserAvatar(Integer momentId);
}
